<template>
  <div id="app">
    <el-container>
      <el-header><nav-bar></nav-bar> </el-header>
      <el-main>
        <router-view v-if="isRouterShow" :key="$route.fullPath"></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script>
import NavBar from "@/components/NavBar.vue";
export default {
  name: "App",
  components: { NavBar },
  provide() {
    return {
      reload: this.reload,
    };
  },
  data() {
    return {
      isRouterShow: true,
    };
  },
  methods: {
    async reload() {
      this.isRouterShow = false;
      await this.$nextTick();
      this.isRouterShow = true;
    },
  },
};
</script>

<style>
@import "~assets/css/base.css";
@import "~assets/css/iconfont.css";
</style>
